package com.itheima.d2_final;

/**
 * 静态常量的赋值，一般是直接赋值【推荐】。也可以使用静态代码块来赋值。
 */
public class FinalDemo2 {
    public final static String SCHOOL_NAME = "黑马";

    static {
       // SCHOOL_NAME = "黑马";
    }

    public static void main(String[] args) {
        // 目标：认识常量及其作用
        System.out.println("SCHOOL_NAME = " + SCHOOL_NAME);

    }
}

class Demo3{
    public static void main(String[] args) {
        System.out.println(FinalDemo2.SCHOOL_NAME);
        //FinalDemo2.SCHOOL_NAME = "黑马";
    }
}